Skip to content

docs: migrate examples to flattened conversation API - #2915

Open
heyitsaamir wants to merge 1 commit into
mainfrom
heyitsaamir-docs-flattened-api-accuracy
Open

docs: migrate examples to flattened conversation API#2915
heyitsaamir wants to merge 1 commit into
mainfrom
heyitsaamir-docs-flattened-api-accuracy

Conversation

@heyitsaamir

Copy link
Copy Markdown
Collaborator

Summary

Weekly doc-accuracy sweep found that several teaching examples still use the chained conversation-client accessors that were deprecated by the flatten PRs (microsoft/teams.ts#634, microsoft/teams.py#502). These are additive/backward-compatible deprecations, so nothing is broken today — but the docs should teach the new 2-hop API.

Changes

Verified the new signatures against SDK source and updated the affected TS + Python fragments:

Old (deprecated) New
reactions.add / reactions.delete conversations.addReaction / conversations.deleteReaction
conversations.members(id).get() conversations.getMembers(id)
conversations.members(id).getById(userId) conversations.getMemberById(id, userId)
conversations.activities(id).create(...) conversations.createActivity(id, ...)

Files touched:

  • in-depth-guides/message-reactions/{typescript,python}.incl.md
  • essentials/api/typescript.incl.md
  • in-depth-guides/message-extensions/action-commands/{typescript,python}.incl.md
  • migrations/botbuilder/the-api-client/{typescript,python}.incl.md (code + mapping tables)

Notes

  • Dated blog post (blog/2026-05-18-reaction-extensibility-preview) intentionally left unchanged — it is point-in-time.
  • Streaming feature updates from the same week (reuse-after-close, error handling / 2-min timeout, multi-stream) are net-new docs and tracked separately, not in this PR.

Verification

  • Confirmed no deprecated chained accessors remain in src/components/include.
  • Code-fence balance verified in all edited fragments.

Update reaction, member, and activity examples to the flattened
2-hop conversation client methods (ts#634 / py#502) instead of the
now-deprecated chained accessors:

- reactions.add/delete -> conversations.addReaction/deleteReaction
- conversations.members(id).get -> conversations.getMembers
- conversations.members(id).getById -> conversations.getMemberById
- conversations.activities(id).create -> conversations.createActivity

Applies to TS + Python teaching fragments and the botbuilder
migration mapping tables.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 15, 2026 04:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Teams SDK documentation include-fragments to teach the newer flattened conversation API surface (2-hop access) instead of deprecated chained accessors, aligning guidance with the post-deprecation SDK shape.

Changes:

  • Replace deprecated conversations.members(...).get*() usage with conversations.getMembers(...) / getMemberById(...) (TS) and get_members(...) / get_member_by_id(...) (Python).
  • Replace deprecated reactions.* usage with conversations.addReaction/deleteReaction (TS) and conversations.add_reaction/delete_reaction (Python).
  • Update BotBuilder→Teams SDK mapping tables to match the new method names (with one remaining inconsistency noted in comments).
Show a summary per file
File Description
teams.md/src/components/include/migrations/botbuilder/the-api-client/typescript.incl.md Migrates BotBuilder migration examples/table rows to flattened conversation methods (TS).
teams.md/src/components/include/migrations/botbuilder/the-api-client/python.incl.md Migrates BotBuilder migration examples/table rows to flattened conversation methods (Python).
teams.md/src/components/include/in-depth-guides/message-reactions/typescript.incl.md Updates reactions examples to use api.conversations.addReaction/deleteReaction (TS).
teams.md/src/components/include/in-depth-guides/message-reactions/python.incl.md Updates reactions examples to use ctx.api.conversations.add_reaction/delete_reaction (Python).
teams.md/src/components/include/in-depth-guides/message-extensions/action-commands/typescript.incl.md Updates member listing example to api.conversations.getMembers(...) (TS).
teams.md/src/components/include/in-depth-guides/message-extensions/action-commands/python.incl.md Updates member listing example to ctx.api.conversations.get_members(...) (Python).
teams.md/src/components/include/essentials/api/typescript.incl.md Updates essentials API snippet to api.conversations.getMembers(...) (TS).

Review details

  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Low

| BotBuilder (TeamsInfo) | Teams SDK (ApiClient) |
|------------------------|----------------------|
| `TeamsInfo.getMembers(context, user_id)` | `api.conversations.members(conversation_id).get(user_id)` |
| `TeamsInfo.getMembers(context, user_id)` | `api.conversations.get_member_by_id(conversation_id, user_id)` |
@corinagum

Copy link
Copy Markdown
Collaborator

It might be a little premature to ship this since the flattening isn't released in PY yet, I believe.

@heyitsaamir

Copy link
Copy Markdown
Collaborator Author

Agree. Not pushing yet @corinagum. My automation just caught this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants